//
//  FQDMenuItem.h
//  FakeQDaily
//
//  Created by mewxiv on 8/28/16.
//  Copyright © 2016 Xensius. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface FQDMenuItem : NSObject

// 菜单项标题
@property (nonatomic, copy) NSString *title;
// 菜单图标图片名（从Assets中获取图标资源）
@property (nonatomic, copy) NSString *iconName;
// 菜单图标图片URL(从URL中获取图标资源)
@property (nonatomic, copy) NSString *iconURL;

+ (instancetype)menuItemWithTitle:(NSString *)title iconName:(NSString *)iconName;
+ (instancetype)menuItemWithTitle:(NSString *)title iconURL:(NSString *)iconURL;

@end

typedef void (^FQDMenuItemSelectAction)();

@interface FQDActionMenuItem : FQDMenuItem

// 点击菜单后响应的事件回调
@property (nonatomic, copy) FQDMenuItemSelectAction selectAction;

- (void)setSelectAction:(FQDMenuItemSelectAction)selectAction;

@end

@interface FQDMenuItemContainer : FQDMenuItem

// 子菜单列表
@property (nonatomic, strong) NSArray<FQDMenuItem *> *subItems;

@end